package com.lakeworks.service.impl;

import com.lakeworks.domain.status.StaPickup;
import com.lakeworks.mapper.StaPickupMapper;
import com.lakeworks.service.IStaPickupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 入厂单状态Service业务层处理
 *
 * @author lake
 * @date 2023-02-23
 */
@Service
public class StaPickupServiceImpl implements IStaPickupService {
    @Autowired
    private StaPickupMapper staPickupMapper;

    /**
     * 查询入厂单状态
     *
     * @param id 入厂单状态主键
     * @return 入厂单状态
     */
    @Override
    public StaPickup selectStaPickupById(Long id) {
        return staPickupMapper.selectStaPickupById(id);
    }

    /**
     * 查询入厂单状态列表
     *
     * @param staPickup 入厂单状态
     * @return 入厂单状态
     */
    @Override
    public List<StaPickup> selectStaPickupList(StaPickup staPickup) {
        return staPickupMapper.selectStaPickupList(staPickup);
    }

    /**
     * 新增入厂单状态
     *
     * @param staPickup 入厂单状态
     * @return 结果
     */
    @Override
    public int insertStaPickup(StaPickup staPickup) {
        return staPickupMapper.insertStaPickup(staPickup);
    }

    /**
     * 修改入厂单状态
     *
     * @param staPickup 入厂单状态
     * @return 结果
     */
    @Override
    public int updateStaPickup(StaPickup staPickup) {
        return staPickupMapper.updateStaPickup(staPickup);
    }

    /**
     * 批量删除入厂单状态
     *
     * @param ids 需要删除的入厂单状态主键
     * @return 结果
     */
    @Override
    public int deleteStaPickupByIds(Long[] ids) {
        return staPickupMapper.deleteStaPickupByIds(ids);
    }

    /**
     * 删除入厂单状态信息
     *
     * @param id 入厂单状态主键
     * @return 结果
     */
    @Override
    public int deleteStaPickupById(Long id) {
        return staPickupMapper.deleteStaPickupById(id);
    }

    @Override
    public int deleteStaPickupByPickupId(Long pickupId) {
        return staPickupMapper.deleteStaPickupByPickupId(pickupId);
    }
}
